import java.util.Arrays;
//自定义类转变为字符串
public class code9_18 {
    public static void main(String[] args) {
        //字符串转变为数组
        String arr1 = "abc";
        char[] arr2 = arr1.toCharArray();
        System.out.println(Arrays.toString(arr2));
    }
    public static void main1(String[] args) {
        Student student = new Student("高博",30);
        System.out.println(String.valueOf(student));
        System.out.println(String.valueOf(123));
        int vul1 = Integer.parseInt("1123");
        System.out.println(vul1);
    }
}
class Student{
    String name;
    int age;
    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }
    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
